<?php
class ModulePrivilegeSessionVo extends SzAbstractMySqlVo
{

    private $userId;
    private $session;
    private $created;
    private $expired;

    /**
     * Initialize ModulePrivilegeSessionVo.
     *
     * @param $userId
     * @param $session
     * @param $created
     * @param $expired
     * @param boolean $isInsert default false, means for now this vo is initialized not for insert process
     * @return ModulePrivilegeSessionVo
     */
    public function __construct($userId, $session, $created, $expired, $isInsert = false) {
        $this->userId = $userId;
        $this->session = $session;
        $this->created = $created;
        $this->expired = $expired;

        $this->isInsert = $isInsert;
        $this->voClassName = 'ModulePrivilegeSessionVo';
        $this->ormName = 'ModulePrivilegeSession';
    }

    /**
     * @see SzAbstractVo::toArray
     */
    public function toArray($needEncode = false)
    {
        return array(
            'userId' => $this->getUserId(),
            'session' => $this->getSession(),
            'created' => $this->getCreated(),
            'expired' => $this->getExpired(),
        );
    }

    /**
     * @see SzAbstractVo::toEntireArray
     */
    public function toEntireArray($needEncode = false)
    {
        return array(
            'userId' => $this->getUserId(),
            'session' => $this->getSession(),
            'created' => $this->getCreated(),
            'expired' => $this->getExpired(),
        );
    }

    /**
     * @see SzAbstractVo::toPureArray
     */
    public function toPureArray()
    {
        return array(
            $this->getUserId(),
            $this->getSession(),
            $this->getCreated(),
            $this->getExpired(),
        );
    }

    public function getUserId()
    {
        return $this->userId;
    }

    public function setUserId($val)
    {
        $this->saveColumnStatus(0, $this->userId);
        $this->userId = $val;
    }

    public function getSession()
    {
        return $this->session;
    }

    public function setSession($val)
    {
        $this->saveColumnStatus(1, $this->session);
        $this->session = $val;
    }

    public function getCreated()
    {
        return $this->created;
    }

    public function setCreated($val)
    {
        $this->saveColumnStatus(2, $this->created);
        $this->created = $val;
    }

    public function getExpired()
    {
        return $this->expired;
    }

    public function setExpired($val)
    {
        $this->saveColumnStatus(3, $this->expired);
        $this->expired = $val;
    }

}